<template>
  <el-form-item :label-width="item.labelWidth?item.labelWidth:'130px'" :label="item.title" :prop="rules?item.field:''">
    <span slot="label">{{item.title}}
        <el-tooltip v-if="item.info" :content="item.info" placement="top">
          <span class="fas fa-info-circle color"></span>
        </el-tooltip>
      </span>
    <!-- <el-input v-model="form[item.field]" :disabled="disabled"></el-input> -->
    <el-date-picker
      v-model="form[item.field]"
      type="month"
      format="yyyy-MM"
      value-format="yyyy-MM"
      :disabled="disabled"
      @change="change"
      style="width: 100%;"
      placeholder="选择月">
    </el-date-picker>

  </el-form-item>
</template>

<script>
export default {
  // name: 'text'
  props: ['item', 'form', 'rules', 'disabled'],
  methods: {
    change(v) {
      if (this.item.itemChange) {
        this.item.itemChange(this.form, this.item, v);
      }
    }
  }
};
</script>

<style>

</style>
